﻿Imports System.Data.SqlClient

Public Class Dbinterface
    Private Shared cn As SqlConnection
    Public Shared Sub OpenConnection()
        Try
            Dim n = DecryptConnection.DecryptCN()

            cn = New SqlConnection(n)
            cn.Open()
           
        Catch ex As Exception

        End Try
       

    End Sub

    Public Shared Function Connection()
      
        Return cn

    End Function

    Public Shared ReadOnly Property MyConnection As SqlConnection
        Get
            Return cn
        End Get
    End Property
     
End Class
